package com.ruoyi.project.blog.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.blog.domain.BNavigation;
import com.ruoyi.project.blog.mapper.BNavigationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.blog.mapper.BSiteClassMapper;
import com.ruoyi.project.blog.domain.BSiteClass;
import com.ruoyi.project.blog.service.IBSiteClassService;

/**
 * 网址分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-10-10
 */
@Service
public class BSiteClassServiceImpl extends ServiceImpl<BSiteClassMapper, BSiteClass>  implements IBSiteClassService
{
    @Autowired
    private BSiteClassMapper bSiteClassMapper;

    /**
     * 查询网址分类
     * 
     * @param id 网址分类主键
     * @return 网址分类
     */
    @Override
    public BSiteClass selectBSiteClassById(Long id)
    {
        return bSiteClassMapper.selectBSiteClassById(id);
    }

    /**
     * 查询网址分类列表
     * 
     * @param bSiteClass 网址分类
     * @return 网址分类
     */
    @Override
    public List<BSiteClass> selectBSiteClassList(BSiteClass bSiteClass)
    {
        return bSiteClassMapper.selectBSiteClassList(bSiteClass);
    }

    /**
     * 新增网址分类
     * 
     * @param bSiteClass 网址分类
     * @return 结果
     */
    @Override
    public int insertBSiteClass(BSiteClass bSiteClass)
    {
        bSiteClass.setCreateTime(DateUtils.getNowDate());
        return bSiteClassMapper.insertBSiteClass(bSiteClass);
    }

    /**
     * 修改网址分类
     * 
     * @param bSiteClass 网址分类
     * @return 结果
     */
    @Override
    public int updateBSiteClass(BSiteClass bSiteClass)
    {
        bSiteClass.setUpdateTime(DateUtils.getNowDate());
        return bSiteClassMapper.updateBSiteClass(bSiteClass);
    }

    /**
     * 批量删除网址分类
     * 
     * @param ids 需要删除的网址分类主键
     * @return 结果
     */
    @Override
    public int deleteBSiteClassByIds(Long[] ids)
    {
        return bSiteClassMapper.deleteBSiteClassByIds(ids);
    }

    /**
     * 删除网址分类信息
     * 
     * @param id 网址分类主键
     * @return 结果
     */
    @Override
    public int deleteBSiteClassById(Long id)
    {
        return bSiteClassMapper.deleteBSiteClassById(id);
    }
}
